﻿/////////////////////////////////////////////////////////////////
//File: CategoryInfo.cs
//Description: 
//Copyright© 2011 Moliu
//History:
//  2011-4-5 12:08:58    CodeSmith5.0.1    Original Version
/////////////////////////////////////////////////////////////////
using System;
using System.Collections;
using MAF.Common;
using System.Collections.Generic;

namespace My.Blog
{
    /// <summary>
    /// Business entity used to model Category
    /// </summary>
    [Serializable]
    public class CategoryInfo : BaseInfo //,ITreeNode
    {
        #region Properties
 
        ///<summary>
        /// Description
        ///</summary>
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }

        ///<summary>
        /// Icon
        ///</summary>
        public string Icon
        {
            get { return _Icon; }
            set { _Icon = value; }
        }

        ///<summary>
        /// IsPublished
        ///</summary>
        public bool IsPublished
        {
            get { return _IsPublished; }
            set { _IsPublished = value; }
        }

        ///<summary>
        /// IsAllowComment
        ///</summary>
        public bool IsAllowComment
        {
            get { return _IsAllowComment; }
            set { _IsAllowComment = value; }
        }

        public IList<CategoryInfo> Children
        {
            get { return _Children; }
        }

        public IList<Article> Articles
        {
            get { return _Articles; }
        }
        #endregion

        #region Protected Fields
        protected string _Description;
        protected string _Icon;
        protected bool _IsPublished;
        protected bool _IsAllowComment;
        protected IList<CategoryInfo> _Children = new List<CategoryInfo>();
        protected IList<Article> _Articles = new List<Article>();
        #endregion
    }
}